<?php
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
 
// import Joomla modelitem library
jimport('joomla.application.component.modelitem');
 
/**
 * HelloWorld Model
 */
class RedlineModelAccess extends JModelItem
{
	/**
	 * @var string msg
	 */
	protected $msg;
 
	/**
	 * Get the message
	 * @return string The message to be displayed to the user
	 */
	public function getMsg() 
	{
		if (!isset($this->msg)) 
		{
			//Uses JInput if magic quotes is turned off. Falls back to use JRequest.
			if(!get_magic_quotes_gpc()) {
				$id = JFactory::getApplication()->input->get('veu', 1, 'INT' );
			} else {
				$id = JInput::getInt('veu');
			}
 
			switch ($id) 
			{
			case 2:
				$this->msg = $this->getVeuData();
			break;
			default:
			case 1:
				$this->msg = $this->getSangData();
			break;
			}
		}
		return $this->msg;
	}
	
	public function getVeuData() {
		if (!isset($this->msg)) 
		{
			$this->msg = 'Veukutevipprono1!';
		}
		return $this->msg;
	}
	
	public function getSangData() {
		$this->msg = JRequest::getString('sdt', NULL, 'POST');
		return $this->msg.'veu';
	}
}